fjoldi = int(input("Fjöldi einstaklinga: "))
f = open("kjulli.txt", "r")

meinturFjoldi = int(f.readline())

for x in f.readlines():
	if "*" in x:
		break
	listi = x.split(" ")
	tala = int(listi[1])*fjoldi/meinturFjoldi
	print(listi[0] + " " + str(tala) + " " + listi[2], end="")
